/**
 * 首页 model层
 */
module.exports = function( App, doMsql ){
    var app = App.app;
    return {
        // 首页列表数据
        selectData: function( res ){
            
            doMsql.select( {
                tableName: 'zt_prd_sys_tag',
                where: {}
            }, res );
            
        },
        likeData: function( res ){
            doMsql.select( {
                tableName: 'zt_prd_sys_tag',
                where: 'where creator like "%丰%"'
            }, res );
        },
        insertData: function( res ){
            
            doMsql.insert( {
                tableName: 'zt_prd_sys_tag',
                insert: {
                    creator: '张三丰',
                    modifier: '张三丰',
                    is_deleted: '1'
                }
            }, res );
            
        },
        updateData: function( res ){
            
            doMsql.update( {
                tableName: 'zt_prd_sys_tag',
                set: {creator: '李小龙', modifier: '截拳道'},
                where: {
                    is_deleted: '1'
                }
            }, res );
            
        },
        deleteData: function( res ){
            
            doMsql.delete( {
                tableName: 'zt_prd_sys_tag',
                where: {
                    is_deleted: '1'
                }
            }, res );
            
        }
    }
}